home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 5 / MacMania 5.toast / / Tools&Utilities / AppleScript™ Database / AppleScript™ Database (.txt) < prev    next >
Encoding:
FileMaker Pro Database  |  1996-09-01  |  287.0 KB  |  1,720 lines  |  [FMP3/UFSR]

  1.  play makAll work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All 
  2. HBAM2016AUG95
  3. Pro 3.0
  4.  All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dullCopyright 1984-1996 Claris Corporation
  5.  and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. 
  6. HBAM3016AUG95@
  7. Pro 3.0F!
  8. Sunday
  9. Monday
  10. Tuesday
  11.     Wednesday
  12. Thursday
  13. Friday
  14. Saturday
  15. January
  16. February
  17. March
  18. April
  19. August
  20.     September
  21. October
  22. November
  23. December
  24. 1st Quarter
  25. 2nd Quarter
  26. 3rd Quarter
  27. 4th Quarter
  28. dTfUbS
  29. 9/1/96
  30. ABOUT
  31. APPLICATION
  32. COMMENTS
  33. COPY CHECKBOX
  34. CREATION DATE
  35. CURRENT RECORD
  36. DESCRIPTION
  37. FINDER PICTURE
  38. FOUND RECORDS
  39.     LAYOUT ID
  40. MARKED
  41. MODIFICATION DATE
  42. READ ME BUTTON
  43. READ ME ICONS
  44. READ ME TEXT
  45. SCRIPT AUTHOR
  46. SCRIPT CODE
  47. SCRIPT NAME
  48. SCRIPT TYPE
  49. TOTAL RECORDS
  50. DescriptionB
  51. Script CodeB
  52. ApplicationB
  53. No Description
  54. Description
  55. @7A    List View
  56. Read Me
  57. Splash Screen
  58. No DescriptionB
  59. Script NameB
  60. Script AuthorB
  61. Creation DateB
  62. Modification DateB
  63. Total RecordsB
  64. Found RecordsB
  65. Current RecordB
  66. Script TypeB
  67. Read Me IconsB
  68. Read Me ButtonB
  69.  = ""
  70. Read Me TextB
  71. CommentsB
  72. Finder PictureB
  73. Copy CheckboxB
  74. AboutB
  75. A    Layout IDB
  76. MarkedB
  77. About this product...
  78. (click in this area to read more.)
  79. This database is a shell that serves as a repository for all of your AppleScript code and information.
  80. more...
  81. Through a collaborative effort between yourself and the AppleScript community you can share your scripts with others as well as get scripts from other scripters. Under the Script Menu you will find both an Import and Export menu item for trading scripts using this database.
  82. While in its infancy, there are many uses for t
  83. his model. To gain access to a large collection of AppleScript scripts there are many sources that you can check out.
  84. <book, web site & scripting mailing list information pending>
  85. If you have comments or suggestions for this growing database project then please send email to Matt Petrowsky <macventure@aol.com>. Please do not send requests for information about solving AppleScript problems.
  86. DescriptionB
  87. NextD
  88. PrevE
  89. ListF
  90. FindH
  91. ReadMeJ
  92. Description...L9Total Scripts = <<
  93. ABAN>> / Script <<
  94. ABAP>> of <<
  95. ABAO>>
  96. A    List ViewB
  97. Application:N
  98. Author:P
  99. Created:T    Modified:Y
  100. NextZ
  101. Prev[
  102. List]9Total Scripts = <<
  103. ABAN>> / Script <<
  104. ABAP>> of <<
  105. ABAO>>^
  106. Findh
  107. Type:k
  108. ReadMem    Comments:p
  109. Copy script?q
  110. Description:t
  111. Marked
  112. Read MeB
  113. Script NameB
  114. ApplicationC
  115. Script AuthorD
  116. DescriptionI
  117. ListK
  118. List View:M
  119. Script NameN
  120. ApplicationR9Created by <<
  121. ABAH>> on <<
  122. ABAI>> - Modified on <<
  123. ABAK>>T
  124. DescriptionU
  125. NextV
  126. PrevW
  127. Find[
  128. ReadMe]
  129. Sort^9Total Scripts = <<
  130. ABAN>> / Script <<
  131. ABAP>> of <<
  132. ABAO>>_
  133. Splash ScreenB
  134. ReturnFdIf picture exists, select it and drag to the Finder to create a picture clipping that can be viewed.I
  135. Read Me Text Information:
  136. KA)Script for moving Emailer messages to FMP
  137. on run
  138.     local myFolder
  139.         set myFolder to choose folder with prompt "Choose the folder to import into FMPro"
  140.     on error -- e.g. user cancelled
  141.         return
  142.     end try
  143.     walkfolder(myFolder)
  144.     set the text item delimiters to {""}
  145. end run
  146. -- Execute the following when a file or folder is dropped on the icon
  147. on open (myFiles) -- myFiles contains the list of items dragged to the droplet 
  148.     if ((length of myFiles) > 100) then
  149.         display dialog 
  150.             "Please only drag groups of 100 files or folders 
  151. AppleScript
  152.  and Script Editor are trademarks of Apple Computer Inc. AppleScript Database is 
  153.  1996 by Matt Petrowsky developed using FileMaker
  154.  Pro by Claris Corp. All rights reserved foreign and domestic.D
  155. Version 1.0
  156. AppleScript
  157.  and Script Editor are trademarks of Apple Computer Inc. AppleScript Database is 
  158.  1996 by Matt Petrowsky developed using FileMaker
  159.  Pro by Claris Corp. All rights reserved foreign and domestic.D
  160. Version 1.0
  161.  using FileMaker
  162.  Pro by Claris Corp. All rights reserved foreign and domestic.
  163. Useful when embedded into FileMaker Pro. It takes advantage of the OSAX Jon
  164. s Commands which will allow FileMaker Pro to work with the clipboard.
  165. tell application "Finder"
  166.     set OSAX to choose file with prompt "Please locate Jon's Commands..." of type {"osax"}
  167.     move file OSAX to folder "Scripting Additions" of folder "Extensions" of folder 
  168.         "System Folder" of startup disk with replacing
  169. end tell
  170. FileMaker ProF
  171. Install Jon
  172. s CommandsG#Matt Petrowsky <macventure@aol.com>H
  173. 6/14/96J
  174. 6/15/96P
  175. ScriptY
  176. at a time. " buttons {"OK"} default button "OK" with icon stop
  177.     else
  178.         -- Loop through each item.
  179.         repeat with myFile in myFiles -- myFile contains the path to the file
  180.             -- this next step is slow ..."info for myFile" calculates the size of the folder :-(
  181.             -- could try using on error handler and test against a field only folders have
  182.             if (folder of (info for myFile)) then
  183.                 walkfolder(myFile as alias)
  184.             else
  185.                 tell me to ParseFile(alias ((folder1 as text) & x))
  186.                 if my isGood 
  187. then tell me to addToFM()
  188.             end if
  189.         end repeat
  190.     end if
  191. end open
  192. on walkfolder(folder1)
  193.     tell application "Finder"
  194.         set Folder1Contents to list folder folder1
  195.         repeat with x in Folder1Contents
  196.             if kind of alias ((folder1 as text) & x) is "folder" then
  197.                 tell me to walkfolder(alias ((folder1 as text) & x))
  198.             else
  199.                 tell me to ParseFile(alias ((folder1 as text) & x))
  200.                 if my isGood then tell me to addToFM()
  201.             end if
  202.         end repeat
  203.     end tell
  204. end walkfolder
  205. global isGood
  206. global my
  207. Folder -- all this is because i'm lazy
  208. global mySubject
  209. global mySent
  210. global myReceived
  211. global myFrom
  212. global myReplyTo
  213. global myTo
  214. global myCC
  215. global myEnclosure
  216. global myMessage
  217. on ParseFile(myFile) -- Parse a file for the sender's information
  218.     local myFile
  219.     local myLine
  220.     --Subject:     TEST
  221.     --Sent:        04/01  5:19 PM
  222.     --Received:    04/01  6:20 PM
  223.     --From:        Eric Scheid, ironclad@planet.net.au
  224.     --Reply-To:    Eric Scheid, ironclad@planet.net.au
  225.     --To:          Eric Scheid, ir
  226. onclad@planet.net.au
  227.     --CC:          Eric Scheid, ironclad@planet.net.au
  228.     --             Eric Scheid, ironclad@planet.net.au
  229.     --Enclosure:   hutch #2 folder
  230.     --this is the message
  231. . it is always preceded by a blank line.
  232.     set AppleScript's text item delimiters to {":"}
  233.     set myFolder to text item -2 of (myFile as text)
  234.     set AppleScript's text item delimiters to {""}
  235.     set myReplyTo to {}
  236.     set myTo to {}
  237.     set myCC to {}
  238.     set myEnclosure to {}
  239.     set isGood to false
  240.     -- Get the file type
  241.  for the file and make sure it is FCIM (Filing Cabinet Incoming)
  242.     if ((file type of (info for myFile)) = "FCIM") then
  243.         open for access myFile
  244.         try
  245.             set mySubject to characters 14 thru -1 of (read myFile until return) as text -- Subject:
  246.             set mySent to characters 14 thru -1 of (read myFile until return) as text -- Sent:
  247.             set myReceived to characters 14 thru -1 of (read myFile until return) as text -- Received:
  248.             set myFrom to characters 14 thru -1 of (read myFile until return) as t
  249. ext -- From:
  250.             -- following can be zero or more lines for headers {"To:" "CC:" "Enclosure:"}
  251.             set myLine to read myFile until return
  252.             set lineGroup to "unknown"
  253.             repeat while myLine is not return -- read remaining headers until the blank line.
  254.                 if word 1 of myLine is in {"To", "CC", "Enclosure", "Reply-To"} then
  255.                     set lineGroup to word 1 of myLine
  256.                 end if
  257.                 if lineGroup is "To" then
  258.                     set myLine to characters 14 thru -1 of myLine as text
  259.                     set myTo to myTo &
  260.  {myLine}
  261.                 else if lineGroup is "Reply-To" then
  262.                     set myLine to characters 14 thru -1 of myLine as text
  263.                     set myReplyTo to myReplyTo & {myLine}
  264.                 else if lineGroup is "CC" then
  265.                     set myLine to characters 14 thru -1 of myLine as text
  266.                     set myCC to myCC & {myLine}
  267.                 else if lineGroup is "Enclosure" then
  268.                     if word 1 of myLine is not "Enclosure" then
  269.                         set myLine to characters 14 thru -1 of myLine as text
  270.                     end if
  271.                     set myEnclosure to myEnclosure & {myLine}
  272. end if
  273.                 set myLine to read myFile until return
  274.             end repeat
  275.             set myMessage to read myFile to get eof myFile
  276.             if the length of myMessage > 0 then -- remove leading blank lines
  277.                 set myMessage to paragraphs of myMessage
  278.                 repeat while (item 1 of myMessage) is ""
  279.                     set myMessage to items 2 thru -1 of myMessage
  280.                 end repeat
  281.                 set AppleScript's text item delimiters to return -- reassemble as paragraphs
  282.                 set myMessage to myMessage as text
  283.                 set AppleScript's text item
  284.  delimiters to ""
  285.             end if
  286.             set isGood to true
  287.             close access myFile
  288.         on error
  289.             close access myFile
  290.         end try
  291.     end if
  292.     return isGood
  293. end ParseFile
  294. on addToFM()
  295.     -- convert message into format acceptable to filemaker
  296.     set AppleScript's text item delimiters to ASCII character 11 -- reassemble as paragraphs
  297.     set mySubject to mySubject as text
  298.     set mySent to mySent as text
  299.     set myReceived to myReceived as text
  300.     set myFrom to myFrom as text
  301.     set myTo to myTo as text
  302.     set myCC to myCC as
  303.  text
  304.     set myEnclosure to myEnclosure as text
  305.     set myMessage to paragraphs of myMessage as text
  306.     set AppleScript's text item delimiters to ""
  307.     tell application "FileMaker Pro"
  308.         create new record
  309.         show last record
  310.         set cell "folder" to myFolder
  311.         set cell "subject" to mySubject
  312.         set cell "sent" to mySent
  313.         set cell "received" to myReceived
  314.         set cell "from" to myFrom
  315.         set cell "to" to myTo
  316.         set cell "cc" to myCC
  317.         set cell "enclosure" to myEnclosure
  318.         set cell "message" to myMessage
  319.     end tell
  320.     return ""
  321. end addToFM
  322. FileMaker ProF
  323. Emailer to FileMaker ProG
  324. Eric Scheid
  325. 6/14/96J
  326. 6/15/96P
  327. Droplet
  328. ainformation
  329. about
  330. database
  331. bgetting
  332. scripts
  333. email
  334. blaster
  335. emailer
  336. filemaker
  337. fmpro
  338. applescript
  339. syntax
  340. filemaker
  341. window
  342. rects
  343. guy's
  344. munger
  345. ss2.1
  346. install
  347. jon's
  348. commands
  349. single
  350. emailer
  351. filemaker
  352. Splash Screen
  353. About...
  354. Activate Script Editor
  355. Enter Read Me Text
  356. Show Description
  357. Hide Description
  358.     View List
  359. Sort by Script Name
  360. Sort by Application
  361. ReadMe Button
  362. Return Button
  363. Export Scripts
  364. Import Scripts
  365. Closing Script
  366. This script is used to get the dimensions of a FileMaker window so that another window can be centered within it. This script uses an applications called Display Window
  367. tell application "FileMaker Pro"
  368.     set winWidth to 300 -- the width setting of the display window
  369.     set winHeight to 100 -- the height setting of the display window
  370.     set rects to get bounds of window 1 of database "FileMaker Database"
  371.     set lSide to item 1 of rects
  372.     set tSide to item 2 of rects
  373.     set rSide to item 3 of rects
  374.     set bSide to item 4 of rects
  375.     -- need to find out how to get the absolute value of
  376.     -- a particular rects value. Reason being that a window
  377.     -- could be in a second scree
  378. n and have negative values
  379.     set tWidth to (((rSide - lSide) - 20) div 2) - (winWidth div 2) -- the minus 20 accounts for the scroll bar
  380.     set tHeight to (((bSide - tSide) - 39) div 2) - (winHeight div 2) -- the minus 39 accounts for the title bar and scroll bar
  381.     set xcoord to tSide + tHeight
  382.     set ycoord to lSide + tWidth
  383.     activate
  384. end tell
  385. tell application "Window for Script"
  386.     activate
  387. event sysodwas
  388.  "Centered" given font:"helvetica", 
  389. class size
  390. :14, 
  391. class whig
  392. :winHeight, 
  393. class widtCY
  394. :winWidth, 
  395. class wilo
  396. :{ycoord, xcoord}
  397.     bring to front
  398. end tell
  399. {xcoord, ycoord}
  400. rects
  401. FileMaker ProF
  402. Get FileMaker Window RectsG
  403. Matt PetrowskyH
  404. 6/14/96J
  405. 6/15/96P
  406. Script
  407. fA0Useful for learning FileMaker AppleScript Syntax
  408. tell application "FileMaker Pro"
  409.     --OPEN EXAMPLES
  410.     open file ("hard disk:outer folder:inner folder:file name")
  411.     --WHOSE EXAMPLES
  412.     get data (every record whose first cell = 1)
  413.     every record whose cell "a" = 1 and cell 2 contains "cat"
  414.     show (every record whose first cell = "test")
  415.     duplicate (every record whose first cell = "test")
  416.     delete (middle record whose first cell = "test")
  417.     --SHOW EXAMPLES
  418.     show window "Test1"
  419.     show database 2
  420.     show document "Test1"
  421.     show layout 2
  422.     show layout 2
  423.  of window 2
  424.     show every record
  425.     --SET EXAMPLES
  426.     set data first record to "a    b"
  427.     set data record 2 to {"a", "b"}
  428.     set data record 3 of window 2 to {"aa", "bb"}
  429.     set data record 4 of window 2 to "aaa    bbbb"
  430.     set data cell 2 to "ccc"
  431.     set data field 1 to "replaced"
  432.     set data field "c" of database "Test1" to "munged"
  433.     --GET EXAMPLES
  434.     get data first cell
  435.     get data last cell
  436.     cells 1 thru 5
  437.     get data every cell
  438.     record 2
  439.     get data middle record
  440.     records 1 thru 4
  441.     every record
  442.     first cell of 
  443. window 2
  444.     get data last cell of database 2
  445.     cells 1 thru 5 of document 2
  446.     every cell of window "Test1"
  447.     record 2 of database "Test1"
  448.     middle record of last window
  449.     records 1 thru 4 of last document
  450.     every record of last database
  451.     --EXISTS EXAMPLES
  452.     exists first window
  453.     exists cell 67
  454.     exists record 10
  455.     exists FileMaker script "a"
  456.     exists first menu item of menu "external"
  457.     --DO MENU EXAMPLES
  458.     do script first FileMaker script
  459.     do script FileMaker script "a"
  460.     --SORT EXAMPLES
  461.     sort firs
  462. t layout of window 2 by field 2 of window 2
  463.     sort first database
  464.     sort first document by {field "a", field "d"}
  465.     --DUPLICATE EXAMPLES
  466.     duplicate record 2
  467.     duplicate middle record
  468.     duplicate record 3 of window 2 to window 2
  469.     duplicate first menu item of menu "external"
  470.     --CREATE EXAMPLES
  471.     create record
  472.     create record at window 2
  473.     create record at first document
  474.     create record at database 2
  475.     create record with data "data"
  476.     create record at window 2 with data "test2"
  477.     create record at fir
  478. st document with data "test3"
  479.     create record at database 2 with data "test4"
  480.     create record at database 2
  481.     create record with data {"more data", "abc"}
  482.     create record at window 2 with data {"test2", "abc"}
  483.     create record at first document with data {"test3", "abc"}
  484.     create record at database "a" with data {"test4", "abc"}
  485.     create menu with properties {name:"First Custom Menu", ID:123, enabled:false}
  486.     create menu item with properties {name:"First Custom Item", ID:321, enabled:true}
  487.     --DEL
  488. ETE EXAMPLES
  489.     delete record 1
  490.     delete menu item 1 of menu "external"
  491.     --COUNT EXAMPLES
  492.     count records in database "test"
  493.     count layouts in database "test"
  494.     count cells in last window
  495. end tell
  496. Filemaker ProF
  497. FMPRO AppleScript SyntaxH
  498. 6/14/96J
  499. 6/15/96P
  500. ScriptY
  501. Email Blaster  (c) Mactivity, Inc. 1996 
  502. Email Blaster requires Eudora 2.1.1 or later
  503. Written by Gary Stein (gary@mactivity.com)
  504. on open (addresses)
  505.         set numMessages to 0
  506.         set badAddress to 0
  507.         set updateToSend to ""
  508.         if updateToSend = "" then
  509.             set updateToSend to (choose file with prompt "Please locate the text file with the update
  510.             set updateToSend to the result
  511.         end if
  512.         set subjectOfMessage to the text returned of (display dialog "What would you like me to put as the subject?" default answer "")
  513.         copy (open for access updateToSend) to fileRef
  514.         set updateToSend to (read fileRef to (get eof fileR
  515.         if the button returned of (display dialog "Do you want me to send all of these emails, or just queue them in your out box?" buttons {"send", "queue"} default button "queue") = "queue" then
  516.             waitToSend(addresses, updateToSend, subjectOfMessage, numMessages, badAddress)
  517.         else
  518.             repeat with currFile from 1 to (the number of items in addresses)
  519.                 copy (open for access (item currFile of addresses)) to fileRefTwo
  520.                 set addresslist to (read fileRefTwo as list using delimiters retur
  521.                 tell application "Eudora Pro"
  522.                     repeat with currAddress from 1 to the number of items in addresslist
  523.                         set receiver to (item currAddress of addresslist)
  524.                         if receiver does not contain "@" or receiver contains " " then
  525.                             set badAddress to badAddress + 1
  526.                         else
  527.                             --thanks to Jon Wiederspan for everything from here
  528.                             set newMessage to (make message at end of mailbox "out" of mail folder "")
  529.                             set field "To" of newMessage to receiver
  530.                             set field 
  531. "Subject" of newMessage to subjectOfMessage
  532.                             set field "" of newMessage to updateToSend
  533.                             queue newMessage
  534.                             set numMessages to numMessages + 1
  535.                             connect with sending
  536.                             --
  537. to here
  538.                         end if
  539.                     end repeat
  540.                 end tell
  541.             end repeat
  542.             display dialog ("I'm all done!  I sent " & numMessages & " emails. I found " & badAddress & " bad addresses (I didn't send anything to the bad addresses)")
  543.             quit
  544.         end if
  545.     on error
  546.         display dialog ("Error! I had a problem
  547. ably the mail server or client couldn't connect. Please check that both are working. I sent out " & (numMessages + badAddress) & " email(s) before the problem occurred.")
  548.     end try
  549. end open
  550. on waitToSend(addresses, updateToSend, subjectOfMessage, numMessages, badAddress)
  551.         repeat with currFile from 1 to (the number of items in addresses)
  552.             copy (open for access (item currFile of addresses)) to fileRefTwo
  553.             set addresslist to (read fileRefTwo as list using delimiters return)
  554.             tell a
  555. pplication "Eudora Pro"
  556.                 repeat with currAddress from 1 to the number of items in addresslist
  557.                     set receiver to (item currAddress of addresslist)
  558.                     if receiver does not contain "@" or receiver contains " " then
  559.                         set badAddress to badAddress + 1
  560.                     else
  561.                         set newMessage to (make message at end of mailbox "out" of mail folder "")
  562.                         set field "To" of newMessage to receiver
  563.                         set field "Subject" of newMessage to subjectOfMessage
  564.                         set field "" of newMessage to u
  565. pdateToSend
  566.                         queue newMessage
  567.                         set numMessages to numMessages + 1
  568.                     end if
  569.                 end repeat
  570.             end tell
  571.         end repeat
  572.         display dialog ("I'm all done!  I queued " & numMessages & " emails. I found " & badAddress & " bad addresses (I didn't queue the bad addresses)")
  573.         quit
  574.     on error
  575.         display dialog ("Error! I had a problem
  576. please check Eudora. I queued " & (numMessages + badAddress) & " email(s) before the problem occurred.")
  577.     end try
  578. end waitToSend
  579. on quit
  580.     continue quit
  581. end quH
  582. EudoraF
  583. Eudora Email BlasterG
  584. Gary Stein <gary@mactivity.com>H
  585. 6/14/96J
  586. 6/15/96P
  587. Droplet
  588. Email Blaster
  589. written by Gary Stein (gary@mactivity.com)
  590. (c) Mactivity, Inc. 1996
  591. Email Blaster is a little AppleScript that we developed to help us send out a
  592. electronic newsletter to a long list of email addresses. Here's how to use it:
  593. Step #1: Write the message that you want to send out in SimpleText.
  594. Step #2: Create a text file of email addresses where each address is on its own
  595.          line (most databases or spreadsheets can export data like this).
  596.          
  597. Step #3: Drag the e
  598. mail address file onto the Email Blaster icon. You can drag
  599.    multiple email files. Email Blaster will take care of all of them.
  600. Step #4: Answer the questions it asks. The first will be to locate the file
  601.          that contains the message you want to send out. The second will be for
  602.          the Subject of the message (actually, the first time you run this, it
  603.          will probably also ask you to locate Eudora). The last will be whether
  604.          you want to send each email as it is cr
  605. eated, or just to queue them up
  606.          in your out box. If you are on a dial-up connection, or just a slow
  607.          connection to your mail server, you may want to just have the emails
  608.          queued up. When Email Blaster is done, you will need to connect up and
  609.          send the emails yourself.
  610.          
  611. Step #5: Sit back and watch Eudora do its thing. Emails will be created, placed
  612.    in the out box, then sent (if you chose "send"; if not, they will
  613.    just be placed in the out box)
  614. . The script also checks each email address, 
  615.    and will disregard any address that have a space in them or don't contain 
  616.    an "@" symbol. When the script is done, you'll get a count of how many 
  617.    addresses were bad, and how many total emails were sent. This script works
  618.    fine in the background.  On my IIci it was taking about 5 seconds per message.
  619.          
  620. IMPORTANT NOTE ABOUT MEMORY!
  621. ----------------------------
  622. Email Blaster was made to handle long email lists (about 7800 addr
  623. esses). The
  624. script works by reading in all of the addresses into a single variable. In
  625. order to do this without running out of memory, you'll need to boost the memory
  626. partition for Email Blaster in the "Get Info" box. You may need to experiment a
  627. little with the best size for you.
  628. REMEMBER:
  629. --------
  630. You have to have Apple's AppleScript System installed to have this thing work.
  631. In addition to the AppleScript Extension, Email Blaster also uses the following
  632. Scripting Additions:
  633.  Read/Writ
  634.  Display Dialog
  635.  Choose File
  636. These are all part of the standard AppleScript release (like the one with
  637. System 7.5).
  638. Disclaimer:
  639. ----------
  640. Mactivity, Inc. makes no guarantees for the use of this software. It has been
  641. tested on our site and has proven to work. Your results may be different.
  642. Mactivity, Inc. does not support this software, although problems can be
  643. emailed directly to Gary Stein (gary@mactivity.com).
  644. AzThere is a bug in the dictionary for BBEdit that won't take the "8-bit characters" parameter for the Zap Gremlins command.
  645. tell application "BBEdit 4.0"
  646.     activate
  647.     --QUERY FOR HEADLINE TYPE
  648.     with timeout of 18000 seconds
  649.         repeat
  650.             display dialog "Enter the number:" & return & 
  651.                 tab & "1) Action Item" & return & 
  652.                 tab & "2) Job Offer" & return & 
  653.                 tab & "3) Joke" & return & 
  654.                 tab & "4) Press Release" & return & 
  655.                 tab & "5) Special Offer" & return & 
  656.                 tab & "6) Tidbit" default answer "6"
  657.             try
  658.                 set theIndicator to text returned of result as number
  659.                 if theIndicator is in {1, 2, 
  660. 3, 4, 5, 6} then exit repeat
  661.             on error
  662.             end try
  663.         end repeat
  664.     end timeout
  665.     --This added routine will strip out any text from the first
  666.     --occurence of "---------- Headers -------------" to the end of the file
  667.     if (find "-- Headers --" with start at top without extend selection) is true then
  668.         set currentLineNumber to (startLine of selection)
  669.         select (lines currentLineNumber thru -1)
  670.         delete
  671.     end if
  672.     --REPLACE SOME OF THE INVSIBLE CHARACTERS
  673.     set theBetaCharacter to (ASCII charact
  674. er 128)
  675.     replace Every Occurrence searching for theBetaCharacter using "
  676. " with start at top
  677.     set theBetaCharacter to (ASCII character 129)
  678.     replace Every Occurrence searching for theBetaCharacter using "
  679. " with start at top
  680.     set theBetaCharacter to (ASCII character 130)
  681.     replace Every Occurrence searching for theBetaCharacter using "
  682. " with start at top
  683.     set theBetaCharacter to (ASCII character 131)
  684.     replace Every Occurrence searching for theBetaCharacter using "
  685. " with start at top
  686.     set 
  687. theBetaCharacter to (ASCII character 132)
  688.     replace Every Occurrence searching for theBetaCharacter using "
  689. " with start at top
  690.     set theBetaCharacter to (ASCII character 133)
  691.     replace Every Occurrence searching for theBetaCharacter using "
  692. " with start at top
  693.     set theBetaCharacter to (ASCII character 134)
  694.     replace Every Occurrence searching for theBetaCharacter using "
  695. " with start at top
  696.     set theBetaCharacter to (ASCII character 135)
  697.     replace Every Occurrence searching for theBetaCharacter
  698.  using "
  699. " with start at top
  700.     set theBetaCharacter to (ASCII character 136)
  701.     replace Every Occurrence searching for theBetaCharacter using "
  702. " with start at top
  703.     set theBetaCharacter to (ASCII character 137)
  704.     replace Every Occurrence searching for theBetaCharacter using "
  705. " with start at top
  706.     set theBetaCharacter to (ASCII character 138)
  707.     replace Every Occurrence searching for theBetaCharacter using "
  708. " with start at top
  709.     set theBetaCharacter to (ASCII character 139)
  710.     replace Every Occurre
  711. nce searching for theBetaCharacter using "
  712. " with start at top
  713.     set theBetaCharacter to (ASCII character 140)
  714.     replace Every Occurrence searching for theBetaCharacter using "
  715. " with start at top
  716.     set theBetaCharacter to (ASCII character 141)
  717.     replace Every Occurrence searching for theBetaCharacter using "
  718. " with start at top
  719.     set theBetaCharacter to (ASCII character 142)
  720.     replace Every Occurrence searching for theBetaCharacter using "
  721. " with start at top
  722.     set theBetaCharacter to (ASCII cha
  723. racter 143)
  724.     replace Every Occurrence searching for theBetaCharacter using "
  725. " with start at top
  726.     set theBetaCharacter to (ASCII character 144)
  727.     replace Every Occurrence searching for theBetaCharacter using "
  728. " with start at top
  729.     set theBetaCharacter to (ASCII character 145)
  730.     replace Every Occurrence searching for theBetaCharacter using "
  731. " with start at top
  732.     set theBetaCharacter to (ASCII character 146)
  733.     replace Every Occurrence searching for theBetaCharacter using "
  734. " with start at top
  735. set theBetaCharacter to (ASCII character 147)
  736.     replace Every Occurrence searching for theBetaCharacter using "
  737. " with start at top
  738.     set theBetaCharacter to (ASCII character 148)
  739.     replace Every Occurrence searching for theBetaCharacter using "
  740. " with start at top
  741.     set theBetaCharacter to (ASCII character 149)
  742.     replace Every Occurrence searching for theBetaCharacter using "
  743. " with start at top
  744.     set theBetaCharacter to (ASCII character 150)
  745.     replace Every Occurrence searching for theBetaChara
  746. cter using "
  747. " with start at top
  748.     set theBetaCharacter to (ASCII character 151)
  749.     replace Every Occurrence searching for theBetaCharacter using "
  750. " with start at top
  751.     set theBetaCharacter to (ASCII character 152)
  752.     replace Every Occurrence searching for theBetaCharacter using "
  753. " with start at top
  754.     set theBetaCharacter to (ASCII character 153)
  755.     replace Every Occurrence searching for theBetaCharacter using "
  756. " with start at top
  757.     set theBetaCharacter to (ASCII character 154)
  758.     replace Every Occ
  759. urrence searching for theBetaCharacter using "
  760. " with start at top
  761.     set theBetaCharacter to (ASCII character 155)
  762.     replace Every Occurrence searching for theBetaCharacter using "
  763. " with start at top
  764.     set theBetaCharacter to (ASCII character 156)
  765.     replace Every Occurrence searching for theBetaCharacter using "
  766. " with start at top
  767.     set theBetaCharacter to (ASCII character 157)
  768.     replace Every Occurrence searching for theBetaCharacter using "
  769. " with start at top
  770.     set theBetaCharacter to (ASCII
  771.  character 158)
  772.     replace Every Occurrence searching for theBetaCharacter using "
  773. " with start at top
  774.     set theBetaCharacter to (ASCII character 159)
  775.     replace Every Occurrence searching for theBetaCharacter using "
  776. " with start at top
  777.     set theBetaCharacter to (ASCII character 160)
  778.     replace Every Occurrence searching for theBetaCharacter using "
  779. " with start at top
  780.     set theBetaCharacter to (ASCII character 161)
  781.     replace Every Occurrence searching for theBetaCharacter using "
  782. " with start at t
  783.     set theBetaCharacter to (ASCII character 162)
  784.     replace Every Occurrence searching for theBetaCharacter using "
  785. " with start at top
  786.     set theBetaCharacter to (ASCII character 163)
  787.     replace Every Occurrence searching for theBetaCharacter using "
  788. " with start at top
  789.     set theBetaCharacter to (ASCII character 164)
  790.     replace Every Occurrence searching for theBetaCharacter using "
  791. " with start at top
  792.     set theBetaCharacter to (ASCII character 165)
  793.     replace Every Occurrence searching for theBetaC
  794. haracter using "
  795. " with start at top
  796.     set theBetaCharacter to (ASCII character 166)
  797.     replace Every Occurrence searching for theBetaCharacter using "
  798. " with start at top
  799.     set theBetaCharacter to (ASCII character 167)
  800.     replace Every Occurrence searching for theBetaCharacter using "
  801. " with start at top
  802.     set theBetaCharacter to (ASCII character 168)
  803.     replace Every Occurrence searching for theBetaCharacter using "
  804. " with start at top
  805.     set theBetaCharacter to (ASCII character 169)
  806.     replace Every
  807.  Occurrence searching for theBetaCharacter using "
  808. " with start at top
  809.     set theBetaCharacter to (ASCII character 170)
  810.     replace Every Occurrence searching for theBetaCharacter using "
  811. " with start at top
  812.     set theBetaCharacter to (ASCII character 171)
  813.     replace Every Occurrence searching for theBetaCharacter using "" with start at top -- "
  814.     set theBetaCharacter to (ASCII character 172)
  815.     replace Every Occurrence searching for theBetaCharacter using "" with start at top -- "
  816.     set theBetaCha
  817. racter to (ASCII character 173)
  818.     replace Every Occurrence searching for theBetaCharacter using "
  819. " with start at top
  820.     set theBetaCharacter to (ASCII character 174)
  821.     replace Every Occurrence searching for theBetaCharacter using "
  822. " with start at top
  823.     set theBetaCharacter to (ASCII character 175)
  824.     replace Every Occurrence searching for theBetaCharacter using "
  825. " with start at top
  826.     set theBetaCharacter to (ASCII character 176)
  827.     replace Every Occurrence searching for theBetaCharacter using "
  828.  with start at top
  829.     set theBetaCharacter to (ASCII character 177)
  830.     replace Every Occurrence searching for theBetaCharacter using "
  831. " with start at top
  832.     set theBetaCharacter to (ASCII character 178)
  833.     replace Every Occurrence searching for theBetaCharacter using "
  834. " with start at top
  835.     set theBetaCharacter to (ASCII character 179)
  836.     replace Every Occurrence searching for theBetaCharacter using "
  837. " with start at top
  838.     set theBetaCharacter to (ASCII character 180)
  839.     replace Every Occurrence search
  840. ing for theBetaCharacter using "
  841. " with start at top
  842.     set theBetaCharacter to (ASCII character 181)
  843.     replace Every Occurrence searching for theBetaCharacter using "
  844. " with start at top
  845.     set theBetaCharacter to (ASCII character 182)
  846.     replace Every Occurrence searching for theBetaCharacter using "
  847. " with start at top
  848.     set theBetaCharacter to (ASCII character 183)
  849.     replace Every Occurrence searching for theBetaCharacter using "
  850. " with start at top
  851.     set theBetaCharacter to (ASCII character 184
  852.     replace Every Occurrence searching for theBetaCharacter using "
  853. " with start at top
  854.     set theBetaCharacter to (ASCII character 185)
  855.     replace Every Occurrence searching for theBetaCharacter using "
  856. " with start at top
  857.     set theBetaCharacter to (ASCII character 186)
  858.     replace Every Occurrence searching for theBetaCharacter using "
  859. " with start at top
  860.     set theBetaCharacter to (ASCII character 187)
  861.     replace Every Occurrence searching for theBetaCharacter using "" with start at top -- "
  862.     set 
  863. theBetaCharacter to (ASCII character 188)
  864.     replace Every Occurrence searching for theBetaCharacter using "" with start at top -- "
  865.     set theBetaCharacter to (ASCII character 189)
  866.     replace Every Occurrence searching for theBetaCharacter using "
  867. " with start at top
  868.     set theBetaCharacter to (ASCII character 190)
  869.     replace Every Occurrence searching for theBetaCharacter using "
  870. " with start at top
  871.     set theBetaCharacter to (ASCII character 191)
  872.     replace Every Occurrence searching for theBetaCha
  873. racter using "
  874. " with start at top
  875.     set theBetaCharacter to (ASCII character 192)
  876.     replace Every Occurrence searching for theBetaCharacter using "
  877. " with start at top
  878.     set theBetaCharacter to (ASCII character 193)
  879.     replace Every Occurrence searching for theBetaCharacter using "
  880. " with start at top
  881.     set theBetaCharacter to (ASCII character 194)
  882.     replace Every Occurrence searching for theBetaCharacter using "
  883. " with start at top
  884.     set theBetaCharacter to (ASCII character 195)
  885.     replace Every O
  886. ccurrence searching for theBetaCharacter using "
  887. " with start at top
  888.     set theBetaCharacter to (ASCII character 196)
  889.     replace Every Occurrence searching for theBetaCharacter using "
  890. " with start at top
  891.     set theBetaCharacter to (ASCII character 198)
  892.     replace Every Occurrence searching for theBetaCharacter using "
  893. " with start at top
  894.     set theBetaCharacter to (ASCII character 199)
  895.     replace Every Occurrence searching for theBetaCharacter using "
  896. " with start at top
  897.     set theBetaCharacter to (ASC
  898. II character 200)
  899.     replace Every Occurrence searching for theBetaCharacter using "
  900. " with start at top
  901.     set theBetaCharacter to (ASCII character 201)
  902.     replace Every Occurrence searching for theBetaCharacter using "
  903. " with start at top
  904.     set theBetaCharacter to (ASCII character 202)
  905.     replace Every Occurrence searching for theBetaCharacter using "
  906. " with start at top
  907.     set theBetaCharacter to (ASCII character 203)
  908.     replace Every Occurrence searching for theBetaCharacter using "
  909. " with start at
  910.     set theBetaCharacter to (ASCII character 204)
  911.     replace Every Occurrence searching for theBetaCharacter using "
  912. " with start at top
  913.     set theBetaCharacter to (ASCII character 205)
  914.     replace Every Occurrence searching for theBetaCharacter using "
  915. " with start at top
  916.     set theBetaCharacter to (ASCII character 206)
  917.     replace Every Occurrence searching for theBetaCharacter using "
  918. " with start at top
  919.     set theBetaCharacter to (ASCII character 207)
  920.     replace Every Occurrence searching for theBet
  921. aCharacter using "
  922. " with start at top
  923.     set theBetaCharacter to (ASCII character 208)
  924.     replace Every Occurrence searching for theBetaCharacter using "
  925. " with start at top
  926.     set theBetaCharacter to (ASCII character 209)
  927.     replace Every Occurrence searching for theBetaCharacter using "
  928. " with start at top
  929.     set theBetaCharacter to (ASCII character 210)
  930.     replace Every Occurrence searching for theBetaCharacter using "
  931. " with start at top
  932.     set theBetaCharacter to (ASCII character 211)
  933.     replace Eve
  934. ry Occurrence searching for theBetaCharacter using "
  935. " with start at top
  936.     set theBetaCharacter to (ASCII character 212)
  937.     replace Every Occurrence searching for theBetaCharacter using "
  938. " with start at top
  939.     set theBetaCharacter to (ASCII character 213)
  940.     replace Every Occurrence searching for theBetaCharacter using "
  941. " with start at top
  942.     set theBetaCharacter to (ASCII character 214)
  943.     replace Every Occurrence searching for theBetaCharacter using "
  944. " with start at top
  945.     set theBetaCharacter to 
  946. (ASCII character 215)
  947.     replace Every Occurrence searching for theBetaCharacter using "
  948. " with start at top
  949.     set theBetaCharacter to (ASCII character 216)
  950.     replace Every Occurrence searching for theBetaCharacter using "
  951. " with start at top
  952.     set theBetaCharacter to (ASCII character 217)
  953.     replace Every Occurrence searching for theBetaCharacter using "
  954. " with start at top
  955.     repeat with i from 218 to 255
  956.         set theBetaCharacter to (ASCII character i)
  957.         replace Every Occurrence searching for the
  958. BetaCharacter using "" with start at top
  959.     end repeat
  960.     tell document 1
  961.         -- STEP 1) UNWRAP THE MULTIPLE-LINE PARAGRAPHS
  962.         repeat with i from 1 to the number of lines
  963.             try
  964.                 if the length of line i > 60 then
  965.                     go to line i with select line
  966.                     
  967. event R*chSel 
  968.  Paragraph
  969.                     unwrap with selection only
  970.                 end if
  971.             on error
  972.                 exit repeat
  973.             end try
  974.         end repeat
  975.         -- STEP 2) REMOVE ALL "<" AND ">"
  976.         --reset the cursor to the start of the document
  977.         set selection start to 0
  978. t selection end to 0
  979.         --Find and Change
  980.         replace Every Occurrence searching for "<" using ""
  981.         replace Every Occurrence searching for ">" using ""
  982.         -- STEP 3) STUPEFY QUOTES
  983.         --Find and Change
  984.         replace Every Occurrence searching for "
  985. " using "\""
  986.         replace Every Occurrence searching for "
  987. " using "\""
  988.         replace Every Occurrence searching for "
  989. " using "'"
  990.         replace Every Occurrence searching for "
  991. " using "'"
  992.         -- STEP 4) ZAP THE GREMLINS
  993.         --Make sure the options are set in
  994.  this dialog before running the script
  995.         --This command POSTS A DIALOG unless you check the "No Can't Undo Dialogs" checkbox in
  996.         --the Preferences dialog available in the Edit menu
  997.         --ATTEN: There is a bug in the scripting code for BBEDit that won't allow
  998.         --parameters for this command to be indicated
  999.         --make sure you have "Zap 8-bit characters" unchecked in the application dialog 
  1000.         zap gremlins --with controls and filter linefeeds
  1001.         --STEP 5) REMOVE MULTIPLE SPACES
  1002.         --Find and Ch
  1003.         replace Every Occurrence searching for "      " using " " -- 6 spaces
  1004.         replace Every Occurrence searching for "     " using " " -- 5 spaces
  1005.         replace Every Occurrence searching for "    " using " " -- 4 spaces
  1006.         replace Every Occurrence searching for "   " using " " -- 3 spaces
  1007.         replace Every Occurrence searching for "  " using " " -- 2 spaces
  1008.         -- STEP 6) REMOVE LEADING SPACES
  1009.         repeat with i from 1 to the number of lines
  1010.             repeat
  1011.                 if character 1 of line i is " " then
  1012.     set character 1 of line i to ""
  1013.                 else
  1014.                     exit repeat
  1015.                 end if
  1016.             end repeat
  1017.         end repeat
  1018.         --PARSE THE TEXT FOR URLs, HTTPs, FTPs, and MAILTOs AND ENCASE THEM
  1019.         set theTripWire to true
  1020.         repeat with theSearchItem in {"@", "http://", "ftp://", "mailto://"}
  1021.             set selection start to 0
  1022.             set selection end to 0
  1023.             repeat
  1024.                 --do a find
  1025.                 set theTripWire to (find theSearchItem with extend selection)
  1026.                 --look until no more occurences are found
  1027.                 if theTripWire is false then ex
  1028. it repeat
  1029.                 set offsetOfTheAtCharacter to selection end
  1030.                 --select only the @ character
  1031.                 set selection start to (offsetOfTheAtCharacter - 1)
  1032.                 --FIND THE END OF THE URL
  1033.                 repeat
  1034.                     --select the next character to the right
  1035.                     set theCurrentOffset to selection start
  1036.                     
  1037.                     if theCurrentOffset is (count of characters) + 1 then --last character in the document
  1038.                         if last character is "." then -- last character of the document
  1039.                             delete last character
  1040.                             
  1041. replace selection using ">."
  1042.                         else
  1043.                             replace selection using thisChar & ">"
  1044.                         end if
  1045.                         exit repeat
  1046.                     else
  1047.                         set selection end to (theCurrentOffset + 2)
  1048.                         set selection start to (theCurrentOffset + 1)
  1049.                         
  1050.                         --copy the clipboard to a variable
  1051.                         set thisChar to selected text
  1052.                         --examine the character
  1053.                         if thisChar is " " then
  1054.                             replace selection using "> "
  1055.                             exit repeat
  1056.                         else if thisChar is return then -- in case the URL ends a li
  1057.                             replace selection using ">" & return
  1058.                             exit repeat
  1059.                         else if thisChar is "," then -- in case there is a comma delimited list of URLs
  1060.                             replace selection using ">,"
  1061.                             exit repeat
  1062.                         else if thisChar is ";" then -- in case there is a semi-colon delimited list of URLs
  1063.                             replace selection using ">;"
  1064.                             exit repeat
  1065.                         else if thisChar is ">" then -- to prevent double encasing
  1066.                             exit repeat
  1067.                         else if thisChar is ")" then -- to remove parens
  1068.                     replace selection using ">"
  1069.                             exit repeat
  1070.                         else if thisChar is "." then -- check for "end of line" periods
  1071.                             if character (theCurrentOffset + 2) is " " or 
  1072.                                 character (theCurrentOffset + 2) is return then
  1073.                                 replace selection using ">."
  1074.                                 exit repeat
  1075.                             end if
  1076.                         end if
  1077.                     end if
  1078.                 end repeat
  1079.                 --reset the selection back to the @ character
  1080.                 set selection start to (offsetOfTheAtCharacter - 1)
  1081.                 set selection end to offsetOfTheAtC
  1082. haracter
  1083.                 --FIND THE BEGINNING OF THE URL
  1084.                 repeat
  1085.                     --select the next character to the right
  1086.                     set theCurrentOffset to selection start
  1087.                     
  1088.                     if theCurrentOffset is 1 then -- the first character of the document
  1089.                         replace selection using "<" & thisChar
  1090.                     else
  1091.                         set selection end to (theCurrentOffset)
  1092.                         set selection start to (theCurrentOffset - 1)
  1093.                         
  1094.                         --copy the clipboard to a variable
  1095.                         set thisChar to selected text
  1096.                         --examine the chara
  1097.                         if thisChar is " " then
  1098.                             replace selection using " <"
  1099.                             exit repeat
  1100.                         else if thisChar is tab then -- in case the URL is after a tab
  1101.                             replace selection using "    <"
  1102.                             exit repeat
  1103.                         else if thisChar is return then -- in case the URL starts a line following a line
  1104.                             replace selection using return & "<"
  1105.                             exit repeat
  1106.                         else if thisChar is "<" then -- to prevent double encasing
  1107.                             exit repeat
  1108.                         else if thisChar is "(" then -- to remo
  1109. ve parens
  1110.                             replace selection using "<"
  1111.                             exit repeat
  1112.                         end if
  1113.                     end if
  1114.                 end repeat
  1115.                 --reset the selection back to the @ character + 1 to continue the search
  1116.                 set selection start to offsetOfTheAtCharacter
  1117.                 set selection end to offsetOfTheAtCharacter + 1
  1118.             end repeat
  1119.         end repeat
  1120.         -- STEP 7) INSERT HEADER TEXT
  1121.         --RESET THE SELECTION TO THE TOP OF THE DOCUMENT
  1122.         set selection start to 0
  1123.         set selection end to 0
  1124.         if theIndicator is 1 then
  1125.             se
  1126. t theHeaderText to "This action item is from:" & return & return
  1127.         else if theIndicator is 2 then
  1128.             set theHeaderText to "This job offer is from:" & return & return
  1129.         else if theIndicator is 3 then
  1130.             set theHeaderText to "This joke is from:" & return & return
  1131.         else if theIndicator is 4 then
  1132.             set theHeaderText to "This press release is from:" & return & return
  1133.         else if theIndicator is 5 then
  1134.             set theHeaderText to "This special offer is from:" & return & return
  1135.         else if theIndicatorh
  1136.  is 6 then
  1137.             set theHeaderText to "This tidbit is from:" & return & return
  1138.         end if
  1139.         insert text theHeaderText
  1140.     end tell
  1141. end tell
  1142. beep 2
  1143. BBEdit 4.0F
  1144. s Mail Munger 
  1145. Guy Kawasaki & Sal SoghoianH
  1146. 6/14/96J
  1147. 6/15/96P
  1148. Script
  1149. GUTM 1.0     
  1150. An e-mail cleaner script for use with Claris Emailer and BBEdit 4.0.     
  1151. By Guy Kawasaki and Sal Soghoian
  1152. Howdy! Thanks for downloading this script. We hope that you will find it both a useful tool and an informative example in the use of AppleScript. It can be a real timesaver if you convert email from the recieved version to a version suitable for inclusion in word processing, printing, or layouts.
  1153. The script will:
  1154.  Create a custom header at the top of the "cleaned"
  1155.  email file. It currently has options for Action Item, Job Offer, Joke, Press Release, Special Offer, and TIdbit, but these are easily editable and can be changed it the script by opening it into the script editor and making your alterations.
  1156.  Strip out that blob of text at the end of an email message recieved from the Internet that starts with:
  1157. ---------------------------------- Headers -------------------------------------
  1158.  Replace an apporpriate "blank box" character with the beta ch
  1159. aracter (
  1160.  Unwrap any multiple line paragraphs whose first line is more than 60 characters
  1161.  Delete exisitng greater than (>), less than (<) characters
  1162.  Stupefy quotes. In other words, make the curley quotes and apostrophes into inch/feet marks.
  1163.  Remove control characters and filter line feeds
  1164.  Remove globs of blank spaces
  1165.  Remove leading spaces from lines of text
  1166.  Encase all URLs in "<" ">", like: <http://users.aol.com/nyhthawk/welcome.html>
  1167. This includes those with an @ c
  1168. haracter and either beginning with "http://" or "ftp://" or  "mailto://"
  1169. REQUIREMENTS     
  1170. Firstly, you must have AppleScript installed and activated. The AppleScript extension must be in the Extensions folder in the System folder.
  1171. You may also want to have the Finder Scripting extension activated as well (if you use System 7.5 or higher), although it is not required to run this script. You'll find it useful for many other tasks to have your actions in the FInder recordable. If you choo
  1172. se to have it active, then it too must be in the Extensions folder in the System folder.
  1173. You must be using BBEdit version 4.0 or higher.
  1174. It has a new scripting dictionary that supports the scripting object model and is very powerful and useful.
  1175. Place GUTM in the BBEdit Scripts folder in the BBEdit folder. It will then become  available under the BBEdit script menu.
  1176. Open the Preferences window from the Edit menu. Choose the Editor prefs from the scrolling list on the left. UNCHECK the b
  1177. ox called      No 
  1178. t Undo
  1179.  Alerts.
  1180. There is a bug in version BBEdit 4.0 concerning setting some of the Zap Gremlin parameters that does not allow the script to set the parameters to required settings. You must instead set them once in the Zap Gremlins dialog which is accessed under the      Text menu. UNCHECK the Zap 8-bit Characters box.
  1181. USING GUTM     
  1182.  Now you're ready to use the script!
  1183.  While in the browser window for an email, choose select all and copy the mail to the clipb
  1184.  Switch to BBEdit, create a new document and paste in the email
  1185.  Run the script, and make you selection from the dialog
  1186.  EPILOGUE     
  1187. Well thanks for taking the time to read this. Enjoy your new script tool. If your interested in  learning more about AppleScript  or getting more free editable scripts, try Sal's website at:
  1188. http://users.aol.com/nyhthawk/welcome.html
  1189. Enjoy!
  1190. A~Click here to read me...
  1191. Clicking on the ReadMe button above will give you information about this database and how to use it.
  1192.     The information found in the read me area will tell you more about how to use this database and who it will help.
  1193. General information about this screen.
  1194.     When there is ReadMe information that accompanys the script code that would be in this area the ReadMe button will be active.
  1195.     At the bottom of this screen you can select whether a copy of the current script will be taken to your script editor.
  1196.     You can also mark your frequently used scripts with the Marked checkbox. ClicB
  1197. king the Script Editor button will launch Script Editor and clicking the ReadMe Text File button will take you to the area where you can enter ReadMe information. Note: any formating to text will not be saved upon export of your scripts.
  1198. General
  1199. Information about this database
  1200. G"Matt Petrowsky <maventure@aol.com>H
  1201. 6/15/96J
  1202. 6/15/96P
  1203. About this product...
  1204. (click in this area to read more.)
  1205.     This database is a shell that serves as a repository for all of your AppleScript code and information.
  1206.     Through a collaborative effort between yourself and the AppleScript community you can share your scripts with others as well as get scripts from other scripters. Under the Script Menu you will find both an Import and Export menu item for trading scripts using this database.
  1207.     While in its infancy, there are many uses fo
  1208. r this model. To gain access to a large collection of AppleScript scripts there are many sources that you can check out.
  1209.      <book, web site & scripting mailing list information coming here soon.>
  1210.     If you have comments or suggestions for this growing database project then please send email to Matt Petrowsky <macventure@aol.com>. Please do not send requests for information about solving AppleScript problems.
  1211.     If needed, this record contains the information about the export and imp
  1212. ort order of the fields in this database.
  1213. In the upper right hand corner you can see the picture of the export order of the fields.
  1214. I use tab-delimited to export in order to make things import/export nicely - comma delimited may get you in trouble if you don't know :-)
  1215. Drag a copy of the picture to the desktop to view it in full view. The picture holder is also an area where you can store PICT files that demonstrate things that are not self evident.
  1216. Enjoy!
  1217. Store your comments here.U
  1218. The objective of this script is to generate a single To: message from a FileMaker database. It will send the message to Claris Emailer.
  1219. --Working with the current showing record
  1220. --we set the information to variables
  1221. tell application "FileMaker Pro"
  1222.  set subjectvar to get data cell named "Subject" of current record
  1223.  set bodyvar to get data cell named "message" of current record
  1224.  set addressvar to get data cell named "Internet Mail" of current record
  1225.  set fname to get data cell named "First Name" of current record
  1226.  set lname to get data cell named "Last Name" of current record
  1227.  set fullname to fname & " " & lname as string
  1228. end tell
  1229. tell application "Claris Emailer 1.1v1"
  1230.  create mail subject subjectvar body bodyvar recipients {name:fullname, address:addressvar, type:0} encoding 0 with save without compress
  1231. end tell
  1232. FileMaker ProF!Single Emailer Msg from FileMakerG
  1233. Matt PetrowskyH
  1234. 6/14/96J
  1235. 6/15/96P
  1236. Script
  1237. A-Click here then click ReadMe for more info...BHNotice that you can use colors to highlight differences in your scripts.D
  1238. General
  1239. Getting more scripts...
  1240. G#Matt Petrowsky <macventure@aol.com>H
  1241. 6/15/96J
  1242. 6/15/96P
  1243. Looking for more scripts?
  1244.     If you are looking for more scripts than there are in this database then you are not alone. Finding scripts that help you learn, are the key to understanding the different dictionaries that applications support.
  1245.     I personally offer a large collection of FileMaker Pro scripts as well as a few Emailer and Eudora scripts. There are other scripters that have other collections for other programs such as QuarkXpress. Rather than including them here (because not
  1246.  everyone wants FileMaker Pro scripts) I will make them available the same way that you can make your scripts available.
  1247.     I will post an exported file to a web site (depending on where it gets set up) that is called FileMaker AppleScripts. You can then download this file and import them into your database. (or you can just email me)
  1248.     From within my copy of the AppleScript Database I can mark which scripts I want to export and then export them. I can then send them to you so that yo
  1249. 1u will have all of the scripts that I have. When you get the file attachment (ususally a very small tab-delimited text file - when compressed) you select IMPORT from the script menu within your copy of the AppleScript Database. By using this method it becomes very easy to share scripts amongst scripters.
  1250. A4Useful for learning FileMaker AppleScript Properties
  1251. tell application "FileMaker Pro"
  1252.     --MENU ITEM PROPERTIES
  1253.     create menu item
  1254.     class of first menu item of menu "File"
  1255.     default type of first menu item of menu "File"
  1256.     best type of first menu item of menu "File"
  1257.     item number of menu item "New
  1258. " of menu "File"
  1259.     checked of menu item "New
  1260. " of menu "File"
  1261.     notify address of first menu item of menu "external"
  1262.     --RECORD PROPERTIES
  1263.     class of first record
  1264.     best type of record 2
  1265.     default type of record -3
  1266.     ID of record 3
  1267.     access of record 2 of da
  1268. tabase 2
  1269.     protection of record 2 of document 2
  1270.     lock of first record
  1271.     --WINDOW PROPERTIES
  1272.     class of window "Test1"
  1273.     best type of window 2
  1274.     default type of window -2
  1275.     name of first window
  1276.     bounds of window 1
  1277.     visible of window 2
  1278.     index of window 2
  1279.     floating of window 2
  1280.     zoomed of first window
  1281.     zoomable of window 2
  1282.     modal of window "Test1"
  1283.     resizable of window 2
  1284.     --MENU PROPERTIES
  1285.     class of menu "File"
  1286.     best type of menu "Select"
  1287.     default type of menu "Scripts"
  1288.     name of menu 2
  1289.     ID of men
  1290. u "File"
  1291.     enabled of menu "File"
  1292.     --LAYOUT PROPERTIES
  1293.     class of first layout of window 2
  1294.     best type of first layout of window 2
  1295.     default type of first layout of window 2
  1296.     name of layout "layout #1"
  1297.     ID of first layout
  1298.     kind of layout 0
  1299.     kind of first layout
  1300.     access of layout 0
  1301.     protection of layout 2
  1302.     lock of first layout of window 2
  1303.     --FIELD PROPERTIES
  1304.     class of first field
  1305.     best type of field "a"
  1306.     default type of field -2
  1307.     ID of first field
  1308.     name of field 2
  1309.     nulls OK of field 2
  1310.     repe
  1311. ats of field "a"
  1312.     repeat size of field "a"
  1313.     unique value of field 2
  1314.     access of field 2
  1315.     protection of field -2
  1316.     formula of field "a"
  1317.     lock of last field
  1318.     --DATABASE PROPERTIES
  1319.     class of first database
  1320.     best type of database -2
  1321.     default type of database "Test1"
  1322.     access of database 2
  1323.     name of database 2
  1324.     name of current layout of database 2
  1325.     ID of current record of first database
  1326.     lock of database 2
  1327.     --CELL PROPERTIES
  1328.     class of cell "a" of window "Test1"
  1329.     best type of cell 2
  1330.     default typ
  1331. e of last cell of last window
  1332.     ID of last cell of last window
  1333.     name of cell 2
  1334.     protection of cell -2
  1335.     formula of cell "c"
  1336.     repeat size of cell 2
  1337.     cellValue of cell 2
  1338.     lock of cell 3
  1339.     --SCRIPT PROPERTIES
  1340.     class of first FileMaker script
  1341.     best type of FileMaker script "a"
  1342.     default type of FileMaker script "a"
  1343.     name of FileMaker script "a"
  1344.     ID of FileMaker script "a"
  1345.     --DOCUMENT PROPERTIES
  1346.     class of document "Test1"
  1347.     best type of document 2
  1348.     default type of document -2
  1349.     name of document 1F'
  1350.     modified of first document
  1351. end tell
  1352. Filemaker ProF
  1353. FMPRO AppleScript PropertiesH
  1354. 6/15/96J
  1355. 6/15/96P
  1356. ScriptY
  1357.     Helvetica
  1358. Geneva
  1359. Times
  1360. Palatino
  1361. New York
  1362. Monaco
  1363. Courier
  1364. Show Description
  1365. Hide Description
  1366. A    View List
  1367. ReadMe Button
  1368. Enter Read Me Text
  1369. Activate Script Editor
  1370. Sort by Script Name
  1371. Sort by Application
  1372. About...
  1373. Moreel
  1374. AppleScript Database by Matt Petrowsky
  1375. Email <macventure@aol.com>
  1376. Copyright 
  1377. 1996 - All rights reserved.
  1378. This database is freeware - public distribution permitted.B+
  1379. ) = 2    
  1380. Splash Screen
  1381. Export Scripts
  1382. Return Button
  1383. Import Scripts
  1384. nulltell application "Script Editor"
  1385. activate
  1386. end tellFasdUAS 1.101.10
  1387. .miscactvnull
  1388. Script Editor
  1389. My Boob Tube
  1390. Script Editor
  1391. @APPLToyS
  1392.     Scripting
  1393. ,My Boob Tub
  1394. e:Develop:Scripting:Script Editor
  1395. .aevtoappnull
  1396. .aevtoappnull
  1397. .miscactvnull
  1398. Closing Script
  1399. ~ffff
  1400. ffffff
  1401. ffff33
  1402. ff33ff
  1403. ff3333
  1404. 33ffff
  1405. 33ff33
  1406. 333333
  1407. wwwwww
  1408. UUUUUU
  1409. DDDDDD
  1410. """"""
  1411. o{o{9
  1412. o{o{9
  1413. o{o{9
  1414. o{o{9
  1415. ~ffff
  1416. ffffff
  1417. ffff33
  1418. ff33ff
  1419. ff3333
  1420. 33ffff
  1421. 33ff33
  1422. 333333
  1423. wwwwww
  1424. UUUUUU
  1425. DDDDDD
  1426. """"""
  1427. o{o{9
  1428. o{o{9
  1429. o{o{9
  1430. o{o{9
  1431. ~ffff
  1432. ffffff
  1433. ffff33
  1434. ff33ff
  1435. ff3333
  1436. 33ffff
  1437. 33ff33
  1438. 333333
  1439. wwwwww
  1440. UUUUUU
  1441. DDDDDD
  1442. """"""
  1443. ~ffff
  1444. ffffff
  1445. ffff33
  1446. ff33ff
  1447. ff3333
  1448. 33ffff
  1449. 33ff33
  1450. 333333
  1451. wwwwww
  1452. UUUUUU
  1453. DDDDDD
  1454. """"""
  1455. ~ffff
  1456. ffffff
  1457. ffff33
  1458. ff33ff
  1459. ff3333
  1460. 33ffff
  1461. 33ff33
  1462. 333333
  1463. wwwwww
  1464. UUUUUU
  1465. DDDDDD
  1466. """"""
  1467. ~ffff
  1468. ffffff
  1469. ffff33
  1470. ff33ff
  1471. ff3333
  1472. 33ffff
  1473. 33ff33
  1474. 333333
  1475. wwwwww
  1476. UUUUUU
  1477. DDDDDD
  1478. """"""
  1479. ~ffff
  1480. ffffff
  1481. ffff33
  1482. ff33ff
  1483. ff3333
  1484. 33ffff
  1485. 33ff33
  1486. 333333
  1487. wwwwww
  1488. UUUUUU
  1489. DDDDDD
  1490. """"""
  1491. ~ffff
  1492. ffffff
  1493. ffff33
  1494. ff33ff
  1495. ff3333
  1496. 33ffff
  1497. 33ff33
  1498. 333333
  1499. wwwwww
  1500. UUUUUU
  1501. DDDDDD
  1502. """"""
  1503. ~ffff
  1504. ffffff
  1505. ffff33
  1506. ff33ff
  1507. ff3333
  1508. 33ffff
  1509. 33ff33
  1510. 333333
  1511. wwwwww
  1512. UUUUUU
  1513. DDDDDD
  1514. """"""
  1515. ~ffff
  1516. ffffff
  1517. ffff33
  1518. ff33ff
  1519. ff3333
  1520. 33ffff
  1521. 33ff33
  1522. 333333
  1523. wwwwww
  1524. UUUUUU
  1525. DDDDDD
  1526. """"""
  1527. ~ffff
  1528. ffffff
  1529. ffff33
  1530. ff33ff
  1531. ff3333
  1532. 33ffff
  1533. 33ff33
  1534. 333333
  1535. wwwwww
  1536. UUUUUU
  1537. DDDDDD
  1538. """"""
  1539. ~ffff
  1540. ffffff
  1541. ffff33
  1542. ff33ff
  1543. ff3333
  1544. 33ffff
  1545. 33ff33
  1546. 333333
  1547. wwwwww
  1548. UUUUUU
  1549. DDDDDD
  1550. """"""
  1551. ~ffff
  1552. ffffff
  1553. ffff33
  1554. ff33ff
  1555. ff3333
  1556. 33ffff
  1557. 33ff33
  1558. 333333
  1559. wwwwww
  1560. UUUUUU
  1561. DDDDDD
  1562. """"""
  1563. ~ffff
  1564. ffffff
  1565. ffff33
  1566. ff33ff
  1567. ff3333
  1568. 33ffff
  1569. 33ff33
  1570. 3333ff
  1571. 333333
  1572. wwwwww
  1573. UUUUUU
  1574. DDDDDD
  1575. """"""
  1576. ~ffff
  1577. ffffff
  1578. ffff33
  1579. ff33ff
  1580. ff3333
  1581. 33ffff
  1582. 33ff33
  1583. 333333
  1584. wwwwww
  1585. UUUUUU
  1586. DDDDDD
  1587. """"""
  1588. ~ffff
  1589. ffffff
  1590. ffff33
  1591. ff33ff
  1592. ff3333
  1593. 33ffff
  1594. 33ff33
  1595. 333333
  1596. wwwwww
  1597. UUUUUU
  1598. DDDDDD
  1599. """"""
  1600. ~ffff
  1601. ffffff
  1602. ffff33
  1603. ff33ff
  1604. ff3333
  1605. 33ffff
  1606. 33ff33
  1607. 3333ff
  1608. 333333
  1609. wwwwww
  1610. UUUUUU
  1611. DDDDDD
  1612. """"""
  1613. **TTU
  1614. **TT**+**T
  1615. **+*TU
  1616. +**T*T**T
  1617. \bcbb\bc
  1618. ++*++
  1619. ++*++
  1620. +**++
  1621. ++TTUTT**TU
  1622. ++*TTUT**TTU
  1623. TT*TT
  1624. *+**T*T
  1625. )./Y/
  1626. +*T*T*T
  1627. **T**+*TU
  1628. TT*TTU
  1629. **T**T*T*TTU
  1630. TT*TU
  1631. ]3    233]
  1632. 3^]3.3
  1633. ++TTU
  1634. ++**T
  1635. ]33W3W
  1636. 3-2332
  1637. Y./.    -.
  1638. UT**TTUT
  1639. ^W^W^
  1640. *    TTUUTTUU
  1641. ^W323W
  1642. UU*TU
  1643. .4-43
  1644. W23W2,2
  1645. SYY/    39.
  1646. W]33    -^
  1647. *U+UU
  1648. ^:ee:
  1649. 3W3^^
  1650. ^]W]W],
  1651. Y5SYV
  1652. ,23W^
  1653. }YY}Y
  1654. }Y}YS/
  1655. )**+*
  1656.     3^33
  1657. 33W^3
  1658. 3W^]33
  1659. *+*+U
  1660. 33W3W
  1661. 33W:W3
  1662. 334]^W^32    
  1663. ++**U
  1664. W33Wd
  1665. X]^W3
  1666. ^3    33    3^
  1667. ^W3]^W33
  1668. 33W39W
  1669. *+*+*
  1670. ~ffff
  1671. ffffff
  1672. ffff33
  1673. ff33ff
  1674. ff3333
  1675. 33ffff
  1676. 33ff33
  1677. 333333
  1678. wwwwww
  1679. UUUUUU
  1680. DDDDDD
  1681. """"""
  1682. (LIST
  1683. LISTA(Applet
  1684. Droplet
  1685. FaceSpan
  1686. Script
  1687. VDEFA(
  1688. (LIST
  1689. LISTA
  1690. VDEFA(
  1691. AppleScript TypeB
  1692. Boolean
  1693. Export Scripts
  1694. Return Button
  1695. Import Scripts
  1696. 9/1/96
  1697. ABOUT
  1698. APPLICATION
  1699. COMMENTS
  1700. COPY CHECKBOX
  1701. CREATION DATE
  1702. CURRENT RECORD
  1703. DESCRIPTION
  1704. FINDER PICTURE
  1705. FOUND RECORDS
  1706.     LAYOUT ID
  1707. MARKED
  1708. MODIFICATION DATE
  1709. READ ME BUTTON
  1710. READ ME ICONS
  1711. READ ME TEXT
  1712. SCRIPT AUTHOR
  1713. SCRIPT CODE
  1714. SCRIPT NAME
  1715. SCRIPT TYPE
  1716. TOTAL RECORDS
  1717. DescriptionB
  1718. Script CodeB
  1719. ApplicationB
  1720.